<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <title></title>
    <link rel="stylesheet" href="/Public/mui/computer/css/bootstrap.css"/>
    <link rel="stylesheet" href="/Public/mui/computer/css/index.css"/>
    <link rel="stylesheet"  href="/Public/mui/static/bower_components/sweetalert/dist/sweetalert.css">
</head>
<body>
<div id="section">
    <table class="table table-hover table-bordered">
            <thead >
            <tr>
                <th>常住地址检测</th>
                <th>公司地址检测</th>
                <th>手机在网时长</th>
                <th>征信情况</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="juzu">
                        <p class="jiancxx">
                        <if condition="$creditlist['credit']['data']['workCheck'] eq '1'">{{$creditlist['lend_family_address']}}(检测不通过)
                        <elseif condition="$creditlist['credit']['data']['workCheck'] eq 2"/>{{$creditlist['lend_family_address']}}(无记录)
                         <elseif condition="$creditlist['credit']['data']['workCheck'] eq null"/>{{$creditlist['lend_family_address']}}(检测失败) 
                        <else />{{$creditlist['lend_family_address']}}(检测成功) 
                        </if>
                        </p>
                    </td>
                    <td class="gsdz"> 
                        <p class="jiancxx">
                            <if condition="$creditlist['credit']['data']['homeCheck'] eq 1">{{$creditlist['account_address_work']}}(检测不通过)
                            <elseif condition="$creditlist['credit']['data']['homeCheck'] eq 2"/>{{$creditlist['account_address_work']}}(无记录)
                            <elseif condition="$creditlist['credit']['data']['homeCheck'] eq null"/>{{$creditlist['lend_family_address']}}(检测失败)  
                            <else />{{$creditlist['account_address_work']}}(检测成功)
                            </if>
                        </p>
                    </td>
                    <td class="zxsc"><p  class="jiancxx">在网时长:{{$creditlist['credit']['data']['monbileOnline']}} / {{$creditlist['tosay']}}</p></td>
                    <td class="zxqk">
                        <p class="jiancxx">
                            <if condition="$recordcount NEQ 0">
                                <for start="0" end="$recordcount">
                                    <a href="#">{{$creditlist['credit']['data']['record'][$i]}}</a><br />
                                </for>
                                <else />
                            征信情况正常
                            </if>
                        </p>
                    </td>
                    <td><a href="javascript:creditdit();" class="liat">点击获取征信信息</a></td>
                </tr>
            </tbody>
    </table>
</div>
<script src="/Public/mui/computer/js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="/Public/mui/static/bower_components/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript" src="/Public/mui/computer/js/functions.js"></script>
<script>
$(function(){
        $('.jiancxx').css('display','none');
        var typeid = "{{$creditlist['credittype']}}";
        if(typeid == 1){
           $(".liat").text("征信信息验证成功");
           $('.jiancxx').css('display','block');
           $('.liat').removeAttr('href');
        }else if(typeid == -1){
            $('.jiancxx').css('display','block');
            $(".jiancxx").text("征信获取失败");
            $(".liat").css("display",'none');
        }
         
});
    function creditdit(){
        var id = "{{$dataid}}";
        $.post("creditIndex",{id:id},function(data){
            if(data.credittype == -1){
                    $(".juzu").text("(检测失败)");
                    $(".gsdz").text("(检测失败)");
                    $(".zxsc").text("检测失败");
                    $(".zxqk").text("检测失败");
                    $(".liat").css("display",'none');

            }else{
                if(data.credit.data.homeCheck == 1){
                    $(".juzu").text(data['account_address_work']+"(检测不通过)");
                }else if(data.credit.data.homeCheck == 2){
                    $(".juzu").text(data['account_address_work']+"(无记录)");
                }else if(data.credit.data.homeCheck === null){
                    $(".juzu").text(data['account_address_work']+"(检测失败)");
                }else{
                    $(".juzu").text(data['account_address_work']+"(检测成功)");
                }
                if(data.credit.data.workCheck == 1){
                    $(".gsdz").text(data['lend_family_address']+"(检测不通过)");
                }else if(data.credit.data.workCheck == 2){
                    $(".gsdz").text(data['lend_family_address']+"(无记录)");
                }else if(data.credit.data.workCheck === null){
                    $(".gsdz").text(data['lend_family_address']+"(检测失败)");
                }else{
                    $(".gsdz").text(data['lend_family_address']+"(检测成功)");
                }
                $(".zxsc").text("在网时长:"+data.credit.data.monbileOnline+"/"+data.tosay);
                if(data['credit']['data']['record'].length != 0){
                    for(i in data['credit']['data']['record']){
                        $(".zxqk").append(data.credit.data.record[i]+"<br />");
                    }
                }else{
                    $(".zxqk").append("征信情况正常");
                }
                
                $(".liat").text("征信信息验证成功");
                $('.liat').removeAttr('href');

            }
        },'json');
        
    }

</script>
</body>
</html>